﻿using System.Collections.Generic;
using System.Threading.Tasks;
using NHibernate;

namespace EduFormManager.Models.Repo
{
    public interface IRepository
    {
        void Save(Entity obj);
        Task SaveAsync(Entity obj);
        void Delete(Entity obj);
        T GetById<T>(int id) where T : class;
        IList<T> GetAll<T>() where T : class;
        Task<IList<T>> GetAllAsync<T>() where T : class;
        IList<T> GetBy<T>(IDictionary<string, object> properties) where T : class;
    }
}
